package com.jic.market.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.market.entity.LotteryType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 抽奖活动规则关联表
 * @author : 
 * @email : 
 * @since : 2020-03-03 03:06:55
 * @version : v1.0.0
 */
@Repository
@Mapper
public interface  LotteryTypeMapper {

    long insert(LotteryType lotteryType);

    long delete(Long id);

    long deleteByThemeRefId(Long themeRefId);

    long update(LotteryType lotteryType);

    long updateThemeRefId(@Param("lotteryType") LotteryType lotteryType);

    LotteryType queryByPrimaryKey(Long id);

    List<LotteryType> query(LotteryType lotteryType);

    /**
     * 根据活动id查询奖品奖项
     * @param themeRefId
     * @return
     */
    LotteryType queryByThemeRefId(Long themeRefId);

    List<LotteryType> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("lotteryType") LotteryType lotteryType);

    long queryPageCount(LotteryType lotteryType);
}